#/usr/bin/python
#-*-<coding=UTF-8>-*-

def buildConnectionString(params,connector):
    """
    Build a connection string from a dictionary of parameters.

    Return string.
    """
    
    #connect string with "connector"
    return connector.join(["%s=%s" %(k,v) for k,v in params.items()])

if __name__ == "__main__":
    myParams = {"server":"mpilgrim",
		"database":"master",
		"uid":"sa",
		"pwd":"secret"}
    print buildConnectionString(myParams,";")
    print buildConnectionString(myParams,"-")
    print buildConnectionString(myParams,"/")
